package log720.lab1;

/**
 * A very simple implementation of a 2-D grid
 */
import ca.etsmtl.log720.lab1.ReactionPOA;

public class ReactionsImpl extends ReactionPOA{
	
	private Reaction reac;
  private ArrayList<Reaction> reacList = new ArrayList<Reaction>();
  
  private class Reaction
  {
    private int id;
    private String description;
    private int niveau;
    
    public Reaction(int id, String description, int niveau)
    {
      this.id = id;
      this.description = description;     
      this.niveau = niveau;
    }
    
    public int getId()
    {
      return id;
    }
    
    public String getDescription()
    {
      return description;
    }
    
    public int getNiveau()
    {
      return niveau;
    }
    
    public String toString()
    {
      return getDescription();
    }
  }
	
	public ReactionsImpl() 
	{
		
	}
  
  public void addReaction(int id, String description, int niveau)
  {
    reac = new Reaction(id, description, niveau);
    this.id = id;
    this.description = description;
    this.niveau = niveau;
    reacList.add(inf);
  }

	public Reaction getReaction(int index)
  {
    return reacList.get(index);
  }
  
  public int getReactionListSize()
  {
    return reacList.size();
  }
}